<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>margin</title>
    <style>
        /* 边距以大数值为准,不相加 */
        div {
            width: 100px;
            height: 100px;
        }

        div.box1 {
            background-color: orange;
            margin-bottom: 50px;
        }

        div.box2 {
            background-color: blue;
            margin-top: 40px;
        }
    </style>
</head>

<body>

</body>
<div class="box1"></div>
<div class="box2"></div>

</html>